from rest_framework import viewsets
from .models import ProjectType, Project, ProjectVote, ProjectAttachment
from .serializers import ProjectTypeSerializer, ProjectSerializer, ProjectVoteSerializer, ProjectAttachmentSerializer

class ProjectTypeViewSet(viewsets.ModelViewSet):
    queryset = ProjectType.objects.all()
    serializer_class = ProjectTypeSerializer

class ProjectViewSet(viewsets.ModelViewSet):
    queryset = Project.objects.all()
    serializer_class = ProjectSerializer

class ProjectVoteViewSet(viewsets.ModelViewSet):
    queryset = ProjectVote.objects.all()
    serializer_class = ProjectVoteSerializer

class ProjectAttachmentViewSet(viewsets.ModelViewSet):
    queryset = ProjectAttachment.objects.all()
    serializer_class = ProjectAttachmentSerializer 